package com.tjetc.output;

import org.junit.jupiter.api.Test;

import java.io.*;
import java.nio.charset.StandardCharsets;

public class _7OutputStreamWriter {

    @Test
    public void testOutputStreamWriter() throws IOException {
        BufferedWriter bufferedWriter =
                new BufferedWriter(
                        new OutputStreamWriter(
                                new FileOutputStream("/Users/gaoyongxiang/百度网盘/IDEA-Java/202507-java-se/chapter16/file/hello.txt"), StandardCharsets.UTF_8));

        bufferedWriter.write("111");
        bufferedWriter.newLine();
    }
}
